﻿using System.Runtime.InteropServices;

namespace AESAlgNet
{
    public class AESALG2D
    {
        [StructLayout(LayoutKind.Sequential, Pack = 8)]
        public struct TestStruct
        {
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
            public int[] d;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)]
            public float[] e;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
            public double[] f;

            public int a;
            public float b;
            public double c;
        };
        [DllImport("AESAlg.dll", CallingConvention = CallingConvention.Cdecl)]
        public static extern int T(TestStruct s);

        [DllImport("AESAlg.dll", CallingConvention = CallingConvention.Cdecl)]
        public static extern bool SFR(byte[] rgbROIBuffer, int rgbROIW, int rgbROIH, double pixWidth, double useFreq, ref double mtfValue, double[] mtfArray, double[] freqArray);
    }
}
